package kr.co.mcshop.optionDetail;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OptionDetailService {
	@Autowired
	private SqlSession sqlsession;
	
	public List getAllOptionDetail(Integer integer) {
		OptionDetailMapper mapper = sqlsession.getMapper(OptionDetailMapper.class);
		return mapper.getAllOptionDetail(integer);
	}
	
	public int InsertOptionDetail(Map map){
		OptionDetailMapper mapper = sqlsession.getMapper(OptionDetailMapper.class);
		return mapper.insertOptionDetail(map);
	}
	
	public int UpdateOptionDetail(Map map){
		OptionDetailMapper mapper = sqlsession.getMapper(OptionDetailMapper.class);
		return mapper.updateOptionDetail(map);
	}
	
	public int DeleteOptionDetail(Map map){
		OptionDetailMapper mapper = sqlsession.getMapper(OptionDetailMapper.class);
		return mapper.deleteOptionDetail(map);
	}
}
